<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>AtomicFunctionNode - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → </p>
	<h1 translate="no">AtomicFunctionNode</h1>
		<section>
			<header>
				<div class="class-description"><p><code>AtomicFunctionNode</code> represents any function that can operate on atomic variable types
within a shader. In an atomic function, any modification to an atomic variable will
occur as an indivisible step with a defined order relative to other modifications.
Accordingly, even if multiple atomic functions are modifying an atomic variable at once
atomic operations will not interfere with each other.</p>
<p>This node can only be used with a WebGPU backend.</p></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="AtomicFunctionNode" translate="no">new <a href="#AtomicFunctionNode">AtomicFunctionNode</a><span class="signature">( method : <span class="param-type">string</span>, pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new atomic function node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>method</strong>
									</td>
									<td class="description last">
										<p>The signature of the atomic function to construct.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>pointerNode</strong>
									</td>
									<td class="description last">
										<p>An atomic variable or element of an atomic buffer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>valueNode</strong>
									</td>
									<td class="description last">
										<p>The value that mutates the atomic variable.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="method" translate="no">.<a href="#method">method</a><span class="type-signature"> : string</span> </h3>
					<div class="description">
						<p>The signature of the atomic function to construct.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="parents" translate="no">.<a href="#parents">parents</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Creates a list of the parents for this node for detecting if the node needs to return a value.</p>
						<p>Default is <code>true</code>.</p>
					</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#parents">Node#parents</a></dt>
						</dl>
				</div>
				<div class="member">
					<h3 class="name" id="pointerNode" translate="no">.<a href="#pointerNode">pointerNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
					<div class="description">
						<p>An atomic variable or element of an atomic buffer.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="valueNode" translate="no">.<a href="#valueNode">valueNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
					<div class="description">
						<p>A value that modifies the atomic variable.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Overwrites the default implementation to return the type of
the pointer node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>builder</strong>
									</td>
									<td class="description last">
										<p>The current node builder.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The input type.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
					<div class="method">
						<div class="description">
							<p>Overwritten since the node type is inferred from the input type.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>builder</strong>
									</td>
									<td class="description last">
										<p>The current node builder.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
						</dl>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/gpgpu/AtomicFunctionNode.js" translate="no" target="_blank" rel="noopener">src/nodes/gpgpu/AtomicFunctionNode.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>